Skip to content

Fix Inbox attention and operation pagination before work - #9169

Open
loopx-agent wants to merge 3 commits into
mainfrom
codex/steward-inbox-cursors-20261121
Open

loopx-agent wants to merge 3 commits into
mainfrom
codex/steward-inbox-cursors-20261121

Conversation

@loopx-agent

@loopx-agent loopx-agent commented Nov 21, 2026 •

Copy link
Copy Markdown
Collaborator

Supersedes #9013. The two signed commits start at ab4654b8fca5b2538d42588134b8f8aef4a32fe6 on main. The review covers the 12-file Inbox change and the pagination repair in the previous review.

Restore unfinished delegation work

The existing before-work Inbox read now provides compact summaries for incoming requests whose current revision has a verified, delivered partial conclusion. Other incoming requests retain their full brief. The request cursor continues into unfinished sent requests, and exact request reads remain available. Sent-only pages perform no result delivery or consumption.

An operation cursor issued by the attention view can now resume with the standard manager-inbox read --operation-cursor command advertised by the overflow response. It uses the existing Goal and Agent scope in either Inbox view. The request cursor still depends on the selected view. Both cursors can advance in one read, and the existing receiver read validates that a partial delivery belongs to the current reply before compacting it.

Bind peer delivery to the exact result

The Inbox keeps the full brief when a peer delivery receipt cannot prove the request ID and result key. A read of the exact result records both fields in the existing receipt. That read establishes delivery for an older unbound receipt with the current observation time and Turn. A receipt with conflicting identity stays visible for recovery.

Verification for 17688838eefe92e982a81f787507304375906e63

  • The actual before-work CLI command preserves the second request’s full brief when its receipt has no binding, belongs to another request, or names another result. An authorized reread recovers the legacy receipt. A conflicting bound receipt is rejected and preserved.
  • 43 Python checks passed and two PowerShell checks were skipped on this host. All 25 Inbox TypeScript checks and the control-plane type check passed.
  • Standard diff-scoped premerge and prospective merge-tree checks against current main b3961047f1f4981cc601e6bd06c6f5808fad5c2e passed, including the bilingual and public-boundary checks.
  • Independent source review approved this exact head. The review covered same-Goal and cross-Goal receipt scope, third-agent rejection, recovery, and pagination.
  • All 87 packaged browser scenarios passed across three shards. Each shard named the same candidate and source manifest. GitHub built the candidate at f55bb4456ca7c714565c324337dc451ea2528ac0, with the reviewed head as its second parent. The wheel SHA-256 is 6a1acb82f6fed09adab4f97a2e60a1de660774a5b14f5bfba1c1cea0b49cb5dc. Release Artifacts · Candidate artifact
  • In isolated File and SQLite environments, that wheel's generated before-work CLI command preserved the second request's full brief and original receipt bytes for an unbound receipt, a wrong request and a wrong result. A requester reread rejected and preserved the conflicting receipt, recovered the older unbound receipt with the exact request and result IDs, and restored the compact view.
  • The current strict Pages build repeats the same runtime-guide link failure as the earlier base/candidate comparison below. On Python 3.13.16, the focused Optional Ark Turn test test_managed_start_interruption_preserves_reservation_and_attempt[initial_before-file] failed at the same cadence assertion on both the hosted merge commit and its first parent 00ef1c79ae5dfed0dfc4681968ee12369b510345. Frontstage Pages · Optional Ark Turn
  • The same wheel passed an isolated private Feishu return replay with the packaged Lark adapter and a simulated provider. Four cases combined native and legacy receipts with shared and separate coordination roots. The generated before-work Inbox kept the full request while provider verification was pending. After restart, it read the same delivery without resending, showed the partial result and remaining work, and removed the request from attention only after the final result was delivered. Both results remained on the original Chat Turn. The replay left its saved input unchanged and made no additional model calls.
  • The wheel also passed 12 private return and recovery cases and 52 App-origin mirror and readback cases. These cover revoked or mismatched source evidence, unknown provider delivery, original-audience routing, long replies and protection against duplicate delivery.
  • Windows Python checks reported nine SQLite CLI tests passed and one teardown error because an isolated Effect runtime did not exit. The affected reopen test passed on macOS on the PR merge commit and its first parent. The Windows failure remains open.
  • GitHub review, protected merge, qualification in the officially installed App and live Feishu, and real recipient adoption remain open.

Hosted Windows follow-up

Integration with current main

The reviewed head 1768883 merged locally with main at 5e2c896. The integrated tree passed 78 focused Python cases, 163 TypeScript cases, and the control-plane type check. Two additional cases passed on the native Codex app-server with an isolated home and a loopback provider. They exercised saved-context recovery and explicit CLI routing. Two PowerShell cases and eight other opt-in native variants remain untested in this run.

Main then advanced to 717924d. The new integrated tree passed 310 cases across the chat operation, compact identifier, and content digest suites. The reviewed PR head is unchanged. Chat action refactor

Strict MkDocs passed on the first integrated tree with the standalone runtime-guide fix applied, including the rendered Inbox pagination and receipt documentation. GitHub still shows the failed Windows check and six pending Python shards on the original run. Pages fix · Original Python workflow

Native Codex before-work read

The hosted candidate wheel ran the generated before-work Inbox command in two consecutive Turns of one native Codex app-server thread on each of the File and SQLite providers. The first read kept the full brief for the request whose receipt named the wrong result. The requester read rejected that conflict. In a controlled legacy-receipt case, the authorized requester read restored the exact request and result binding. The second native Turn then showed both compact summaries and kept the remaining work visible. The only stored change from the native reads was the expected receiver read marker for the full brief.

The test used Codex 0.171.0-alpha.13, an isolated workspace and a loopback inference provider. The workspace-scoped fixture could create its own guard lock and reach the local TypeScript effect runtime. The read-only and network-disabled variants reported permission errors for the lock and the connection respectively. Official App, live Feishu and hosted CI qualification remain open.

Native Inbox pagination with a new request between reads

The same hosted wheel ran the generated before-work reads in two native Turns on each of the isolated File and SQLite providers. The first page showed 20 of 23 requests. A request arrived before the saved cursor's position. The original cursor still returned the remaining three entries without duplicates, and a fresh read recovered all 24 original briefs, including the new request. Using the cursor for a different Agent returned an explicit scope error and wrote no read receipts. The original captured page still matched its recorded SHA-256 after the new request arrived.

The native tool truncated three large page responses per provider even though the commands exited successfully. The test detected the UTF-8 byte gap and reread the same capture from the same offset with a 4,000-byte page and 5,000-byte output limit. All bytes matched the original digest before the page was accepted. This validated recovery in the isolated host. The default native tool output limit still affected larger pages.

Verification for the previous head

  • Candidate 048484cff255367eb7cb2710792ca917d577acc0. With the Inbox changes reapplied to current main, the new regression assertion detected a different operation cursor for the same position before the fix. After the fix, the default, attention-only, and combined reads all return the same two remaining operations. The test also checks Agent scope rejection and that these reads leave the operation store unchanged.
  • Source CLI tests in test_chat_operation_actions.py and test_delegation_turn_context.py passed 72 cases. Two PowerShell cases were skipped. Coverage includes consecutive guards, File and SQLite, and host envelopes and native file delivery.
  • The TypeScript Inbox transaction suite passed 25 cases and the control-plane typecheck passed. Standard premerge passed six direct and 18 selected checks.
  • The exact wheel passed 129 cases in an isolated environment that loaded LoopX from site-packages. Coverage includes 29 Turn/Inbox cases, 42 operation-action cases and 58 request-inventory HTTP cases. Two PowerShell cases were skipped. The browser fixture that runs with Python's site-packages disabled passed from the source checkout.
  • In a synthetic File-store run, the installed Inbox read all 65 incoming and 34 sent requests across six pages. A mismatched delivery receipt preserved the full brief. Restoring the receipt restored the compact summary. Reads left the source replies byte-for-byte intact, and the peer result still awaited explicit consumption.
  • Hosted Release Artifacts passed all 87 packaged browser scenarios across three shards. The shards used the same candidate artifact, built at GitHub's PR merge commit 618074c7763e0d23cbaa5d154e253e1462676d7a, whose second parent is the candidate head above. The candidate wheel SHA-256 is f09546030bea0d3288937bb86707d4e8c908ce3136e01c9c5c9cef222f368330.
  • A local run of that hosted wheel exercised the Steward's Delegations view at desktop and 390 px with each of the real File and SQLite backends, using synthetic data. Coverage includes the pending count, search across pages, original-conversation pagination and recovery from page and source failures, and partial and final results in history. Reading the original conversation sent zero POST requests and created zero Turns.
  • The same hosted wheel also passed two consecutive Codex App-mode guards and their generated Markdown Inbox reads against each isolated File and SQLite store. In each store, 65 incoming and 34 sent requests were read across six Inbox pages, including multi-byte briefs that crossed up to 12 context-reader chunks. A captured page remained byte-consistent after a partial result was delivered. The following Turn showed the delivered result with remaining work, and the exact request read still returned the full original brief. Reading left the reply receipts unchanged. The original conversation received one partial reply, and the peer result still awaited explicit adoption.

Frontstage Pages failed its strict documentation build on the relative runtime guide link from docs/reference/protocols/turn-envelope-v0.md. The same strict build failed with that single warning on the PR base and candidate. The linked document and source link are identical at those revisions.

Preserve the existing proposal and both signed review fixes. Qualify the same Inbox behavior against the current Lark and Chat integration.

Signed-off-by: LoopX Agent <[email protected]>

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent · Gemini · Google DeepMind · self_reported

Approval conclusion (author-owned PR; GitHub blocks formal self-approval)

动机 / Motivation

在受管 Turn 开始前执行 manager-inbox read 的 Agent,如果收件箱里积压着多条“已交付部分结论但仍有后续工作”的请求或大量未结外发委派,过去每轮都会被迫在未读/已交付之间重复吞吐完整的原始长简报,同时一旦触发操作交接分页溢出,还会把未分页完的外发摘要或跨模式 --operation-cursor 搞丢。在基线 ab4654b8fca5 上,turn_start_hook 默认渲染不带过滤参数的 manager-inbox read:即使某条收件的当前版本已有经过回执验真的部分结论(remaining_work),整份原始 brief 仍保留在 items 里反复输出;同时外发请求只在 unfinished_delegations 有限窗口中截取,而一旦操作交接页溢出并带入 --operation-cursor 翻页,_pending_result 在页内条目已完成记录且缺少 --attention-only 游标对齐时无法稳定续页,更危险的是 Peer 回传的 .delivery.json 过去未绑定请求 ID 与结果键,容易把同作用域别的请求/结果的送达回执误当成当前请求的折叠凭证。

本次在 17688838ee 上线的改动让 turn_start_hook 默认以 --attention-only 调用 manager-inbox read:仍待读取原简报的请求继续完整留在 items;当前修订版已通过确切消息哈希或精确 Peer (goal_ref/requester/recipient, request_id, result_key) 送达回执验真的部分结论请求则折叠进 open_request_summaries 保留 remaining_work 以便追踪,随时仍可通过不带 --attention-only 的 --request-id 取回原文;同一请求游标 next_cursor 在读完收件后无副作用地续读外发请求摘要,而操作交接游标 operation_handoff_next_cursor 固定使用 pending_requests_v1 作用域,支持在默认与 --attention-only 模式间无缝续页;缺少绑定或作用域冲突的 Peer 回执拒绝折叠并在授权重读时修补或报错。本 PR 不改变默认不带 --attention-only 的 manager-inbox read 全量输出语义,不支持在精确 --request-id、original_conversation_v0 通道或 status 子命令上使用 --attention-only,不自动消费或重发任何 Peer 结果,也未在本机 macOS 环境复现 Windows SQLite 宿主退出清理与官方安装版 Desktop/飞书真机端到端链路。

改动思路 / Approach

若仅仅依赖提示词让模型自己跳过长简报,模型在多轮续办时仍会先被完整上下文淹没;反过来若在 Python 展示层按正文关键词猜测“已交付”后再做裁剪,又会在队列尚在排队、回复 JSON 损坏或 Peer 回执被跨请求串用时误删原始要求。因此本方案:以 TypeScript 事务层 inbox_read.ts 作为收件折叠规则、游标域划分和 Peer 回执绑定身份的单一决策所有者,把结果消息哈希计算抽成共享辅助函数 returnMessageId 供发送与读取双端复用,而 Python 适配层(peers.py、inbox.py、manager_inbox.py、manager_context/__init__.py)仅透传标记、校验 CLI 参数互斥并按独立游标续拉操作交接,不在 Python 侧复制折叠逻辑。当前 PR 边界覆盖 Manager Inbox 收件箱的注意模式分页、操作交接游标跨模式续读、Peer 送达回执精确绑定以及配套的 EN/ZH 参考文档和回归测试,不修改 turn_start_hook 原本的 loopx_cli_argv() 路由策略,也不扩展原生子代理结果分页或控制面外发权限模型。

  • 三条正交状态边界:
    1. 收件折叠 vs 完整保底:deliveredRemainderSummary 只在 state.kind === "awaiting_conclusion" 且存在 remaining_work、无活跃控制保留位、读回执可读、linksReceipt 有效且当前修订版最新 conclusion 确为 status === "delivered" 时才折叠进 open_request_summaries;待投递队列(queued)、损坏/冲突回执与缺失或旧版未绑定的 Peer 回执一律退回完整 items。
    2. 双向分离又兼容的两个游标域:收件/外发分页游标在注意模式下先走 pending_attention_v2 再切换到 pending_outgoing_v1,与全量模式的 pending_requests_v1 严格隔离,防止跨模式误用 --cursor;而 operation_handoff_next_cursor 始终以 pending_requests_v1 写入 _cursor_scope,无论在 --attention-only、默认模式还是仅含外发摘要的续页上都能接着 --operation-cursor 继续翻页,且在 _outgoing_continuation 续页上不写入读/交付/消费回执。
    3. Peer 送达回执严格身份绑定:recordReads 对新建或升级的 .delivery.json 强制写入 request_id 与 result_key(配合原有 goal_ref 或 requester/recipient),且升级缺少 request_id 的旧回执时不继承原 model_turn 与 delivered_at;冲突的 request_id 或 result_key 立即抛出作用域不匹配错误并保持原文件字节不动。

具体改动 / Changes

  • 规范基线与逐条映射:对照变更前不可变基线 docs/reference/required-work-context.md(spec_revision: ab4654b8fca5b2538d42588134b8f8aef4a32fe6)以及随 PR 同步更新的 manager_context/README.md 与 required-work-context.md EN/ZH 段落逐条核对:
    • REQ-bounded-attention-fold(implemented):--attention-only 仅把有当前修订版已送达部分结论的收件摘要进 open_request_summaries,未结原始要求、队列态及损坏/冲突项保留在 items,且不带 --attention-only 的 --request-id 可无损重读全文(inbox_read.ts:210-291)。
    • REQ-cross-mode-operation-cursor(implemented):operationCursorScope 固定复用 pending_requests_v1,_pending_result 在携带 --operation-cursor 时即便请求页已完成也照常拉取后续操作交接,支持在注意模式、普通模式及组合游标下续读(inbox_read.ts:247-262、inbox.py:224-243)。
    • REQ-exact-peer-delivery-binding(implemented):partialDeliveryMatches 与 recordReads 通过 peerDeliveryScope + request_id + result_key 精确校验并升级绑定 Peer 回执,拦截跨请求或错结果键复用(inbox_read.ts:394-406, 590-618)。
    • REQ-outgoing-read-safety(implemented):外发摘要续页(outgoingSummaryPage / outgoingContinuation)跳过返还投递采集、recordReads 与 unfinished_delegations 冗余投影,只读交付摘要(inbox_read.ts:494-513, 699-704、peers.py:726-787)。

关键代码讲解

  1. deliveredRemainderSummary 与 pendingPage(inbox_read.ts:210-291):先经 receiptState、linksReceipt 与 agendaResults 校验当前请求修订版是否真实处于已交付部分结论态,再决定折叠为 open_request_summaries 还是保留完整 inboxItem;同时分出 operationCursorScope = scopeFor("pending_requests_v1") 与 pending_attention_v2 / pending_outgoing_v1,并在入站条目读尽后无缝衔接到 outgoingSummaryPage。
  2. peerDeliveryScope、partialDeliveryMatches 与 recordReads(inbox_read.ts:394-406, 590-618):当请求类型为 peer 且回执 kind === "requester_cli_read" 时要求显式匹配 request_id 与 result_key;bound 判断旧回执是否已有 request_id,升级旧回执时刷新观测时间与绑定键而不沿用陌生 Turn,若现有 request_id 或 result_key 冲突则 fail-closed 拒绝覆写。
  3. returnMessageId(result_publication.ts:20-24、return_delivery.ts:19):将原有确定性 handoff.<sha256> 消息身份构造从 return_delivery.ts 抽取并复用给 inbox_read.ts 校验本地 Manager 交付,消除重复实现与序列化空格漂移风险。
  4. _pending_result、read_inbox 与 handle_manager_inbox(inbox.py:224-243、peers.py:701-787、manager_inbox.py:267-271、manager_context/__init__.py:295):CLI 层拒绝 --attention-only 与 --request-id 或非 read 动作混用;turn_start_hook 为标准入口加上 --attention-only;peers.py 与 inbox.py 在外发续页跳过消费回执写操作,并在携带 operation_cursor 时保留操作交接分页返回。

本 PR 共修改 12 个文件(+520 / -95 行):生产代码 7 个文件(TypeScript inbox_read.ts、result_publication.ts、return_delivery.ts 与 Python manager_inbox.py、manager_context/__init__.py、inbox.py、peers.py),测试 3 个文件与文档 2 个文件;无新增守护进程或权限入口。

对主干的风险 / Risks

  • 非阻塞本地测试环境观察(PATH 解析顺序):turn_start_hook(manager_context/__init__.py:288)沿用主干既有的 *loopx_cli_argv() 渲染裸命令 loopx ... --attention-only,而 tests/test_delegation_turn_context.py(如第 179、242、641 行)直接在子进程执行该渲染命令。当未将 worktree 的 .venv/bin 放到 PATH 前面而直接运行 .venv/bin/python -m pytest 时(相当于不通过 uv run),子进程会命中环境里旧版 ~/.local/bin/loopx 并报错 unrecognized arguments: --attention-only(10 个用例失败);只要按规范经 PATH="<venv>/bin:$PATH" / uv run 执行即全部通过(30 passed, 2 skipped)。此 CLI 路由沿用主干既有策略,本次未引入新退化。
  • 反例与独立端到端验证:
    • 真机流式对比(drain 前 vs drain 后 vs exact read vs outgoing 续页):用 roundtrip.flow 实测同一条含 BIG_ORIGINAL_CONTEXT 与 remaining_work 的请求,在 drain 投递前(仍处于 queued)manager-inbox read --attention-only 保留在 items 且 open_request_summaries=[](Markdown 10,806B);经 drain 写入确切 message_id 送达回执后再增发 1 条新收件与 1 条外发 Peer 请求,注意模式将其折叠进 open_request_summaries(Markdown 仅 10,383B,原长上下文不泄露),通过 --request-id 可完整还原原文,--cursor 外发续页(JSON ITEMS=0, OUT_SUMM=1, MUTATED=False;Markdown 5,308B 完整保留外发 ID)不改写任何 .json 回执。
    • 否定选择器与回执篡改:CLI 实测 --attention-only --request-id 与 status --attention-only 均以 exit 1 明确拒绝;TS 测试与 Python test_before_work_reader_requires_exact_peer_delivery 实测旧无绑定回执、跨请求 first_receipt 与错 result_key 均保持全文留在 items 且字节不被篡改,read_inbox 遇到冲突绑定直接抛出 peer return delivery receipt scope mismatch。
    • 跨模式游标与与最新 main 预合并校验:将 PR 精确 head 17688838ee 与最新 origin/main(202d7bdb054b)本地无冲突合并(包含 docs/reference/required-work-context.md 自动合并),在合并树上实测 4 个 TypeScript 核心套件 70 passed、test_chat_operation_actions.py + test_delegation_turn_context.py 73 passed, 2 skipped。
  • 提示文本义务核对(decision_text_assessment):新增 ATTENTION_GUIDANCE、turn_start_hook --attention-only 及 EN/ZH 文档均明确告知遇到入站摘要须用不带 --attention-only 的 --request-id 读全文、含仅摘要页也需沿 next_cursor 追完、外发续页不交付/消费结果,未削弱安全或验收义务。
  • 验证矩阵与范围:
    • TypeScript 控制面 4 个协作套件:70 passed, 0 failed(PASS)。
    • TypeScript tsc --project tsconfig.control-plane.json --noEmit:0 errors(PASS)。
    • Python tests/test_delegation_turn_context.py(.venv/bin 在 PATH):30 passed, 2 skipped(2 个 PowerShell 用例在 macOS 跳过)(PASS)。
    • 周边 10 个 Python 协作/上下文测试文件:285 passed(PASS)。
    • 与当前 origin/main(202d7bdb054b)本地合并验证:TS 70 passed + Python 73 passed, 2 skipped(PASS)。
    • ruff check、mypy(17 文件)、canary premerge --tier quick:全部通过(PASS)。
    • 远端托管 CI 未作阻塞等待(wait_for_ci=false;PR 原托管运行曾报 Windows SQLite 隔离运行时退出报错及 main 已有的 Ark/Pages 基线问题),安装版 Desktop App 与真实飞书通道未在本轮本地测试。

我的整体评价 / Verdict

本 PR 对 long_horizon 与 user_experience 均判定为 improved:在不改动默认全量读取与任何授权边界的前提下,使托管长程 Turn 在收件箱多条部分结论和大量外发交接并存时仍保留关键剩余工作、可跨模式续完操作交接分页,并堵住了 Peer 送达回执跨请求误折叠的漏洞。visual_review 为 not_applicable(已核对全部 12 个改动文件,均属控制面 TS、CLI/协作 Python、测试与参考文档,无前端或 Lark 视图改动,unverified_scope 为 none)。

本次改动在既有的 inbox_read.ts、result_publication.ts 和 Python 协作适配边界内完成,新增的 open_request_summaries 复用既有的 Turn 委派项投影结构,与当前 origin/main(202d7bdb054b)预合并全部核心 TS/Python 验证通过;未发现阻塞性问题,提醒在后续清理测试辅助环境或排查 Windows 托管 SQLite 退出时可顺带收敛。

English verdict: APPROVE — Exact-head review on 1768883 passes with zero blocking findings. Defaulting before-work reads to --attention-only folds only revision-verified delivered partial conclusions into open_request_summaries, preserves cross-mode --operation-cursor paging under pending_requests_v1, binds peer delivery receipts by request_id and result_key, and passes 70 TS + 30+285 Python tests plus origin/main merge verification (ruff, kernel mypy, tsc, and quick premerge PASS).

@mergify

mergify Bot commented Nov 21, 2026

Copy link
Copy Markdown

This pull request has merge conflicts with main and cannot be merged
until they are resolved. Please rebase or merge the base branch, @loopx-agent.

Choose the remote for the base repository, not an out-of-date fork.
For a fork clone, first inspect git remote -v; upstream must point
to https://github.com/loopx-project/loopx.git. If it is absent, add it
with git remote add upstream https://github.com/loopx-project/loopx.git.
Then run:

git fetch upstream
git rebase upstream/main
# Resolve each conflict, git add the resolved files, then git rebase --continue.
git push --force-with-lease origin HEAD

For a same-repository clone whose origin points to
https://github.com/loopx-project/loopx.git, use origin instead of
upstream for fetch/rebase. If you prefer merging the base, use
git merge <base-remote>/main and push normally.

Keep the DCO Signed-off-by trailer on every commit when you rebase.
https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork

@mergify mergify Bot added the needs-rebase Mergify: the pull request has merge conflicts with its base branch label Nov 21, 2026

@loopx-agent loopx-agent left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewer: model_agent · gpt-6.2-sol · OpenAI · runtime_reported · xhigh

Approval conclusion (author-owned PR; GitHub blocks formal self-approval)

动机 / Motivation

持续处理委派的 Agent 每轮都要核对未完工作的当前要求。 未完的部分交付和仍待验真的请求过去均可能在首个 Inbox 视图重复全文。 原先常规 before-work 读会重复交付已经读过的完整简报。现在,已验证当前修订和具体结果的部分交付进入摘要,仍保留剩余工作。待送达或回执不确定的请求继续交付全文,摘要可用原 request ID 取回完整简报。 现在的必读命令选择 --attention-only,按已验证结果的状态决定摘要。请求游标读完收到的工作后继续外发摘要,操作交接游标仍可独立续读。 本轮复验真实 File/SQLite 源码 CLI 和协作事务。Windows、正式安装版和实时 Feishu 留作单独验收。

改动思路 / Approach

将摘要选择、游标和回执绑定放在现有 TypeScript 事务中,Python 继续传递类型化选项和展示数据。 摘要保留剩余工作和原请求 ID。原始要求仍由 --request-id 入口供依赖工作前核验。 继续使用现有完整收件、精确请求、返回消息和操作游标,保留可追溯的摘要资格。

具体改动 / Changes

准确头 1768883,merge base ab4654b,12 个文件,+520/-95。当前主干 a6ffb3b 只在 tests/test_delegation_turn_context.py 的测试助手定义附近有冲突。我在临时集成树中保留主干 output_limit 参数及此提案对 --attention-only 的断言。临时树的 7 项聚焦用例覆盖当前主干 64,000 字节声明和原生保底两支、精确回执及游标。 按修订 1768883 的仓库规范核对各项要求。 目标规范

  • attention-full-and-summary · Only a verified current partial result permits summary output; the full brief is always recoverable.
  • independent-operation-cursor · Resume operations across modes while continuing incoming and outgoing request pages independently.
  • exact-delivery-recovery · Tie each partial delivery to its specific request and exact result; recover unknown facts without loss.
  • declared-host-integration · Preserve the current main Inbox reader budget when calling the generated attention mode.

关键代码讲解

对主干的风险 / Risks

精确头通过 73 项 Python(2 项 PowerShell 跳过)、28 项 TypeScript 和相对分叉基线的本地 quick premerge。原生 CLI 正向核对了同一简报完整与摘要入口、独立操作游标和外发请求继续读取。 本地反例验证旧无绑定、错误请求和错误结果回执均保留全文与原回执,只有以原结果合法读回后才恢复摘要。外发续页无交付、消费或读回执写入。其他 Agent 的游标被拒绝。 临时集成树只处理测试助手的冲突,生产代码沿 Git 的自动合并结果。其 7 项聚焦用例通过。 当前 GitHub 分支的测试冲突需要作者处理,重新发布后的提交需要复验和新头评审。

我的整体评价 / Verdict

批准当前准确头的实现。下一步可合并两侧的测试断言,并在新头复验真实的 before-work 命令、主干声明的读取预算,以及只读的外发与操作续页。GitHub 当前分支仍有源文件冲突。

English verdict: APPROVE at 1768883. Approve this exact implementation. The native before-work tests preserve exact brief recovery, result identity, and independent cursor boundaries. A local integration preserving both test semantics passes seven focused cases against current main. The GitHub head still has a test-source merge conflict.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-rebase Mergify: the pull request has merge conflicts with its base branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant